<?php

/**
 * +---------------------------------------------------------------
 * | Author: 北京永青宇创科技有限公司
 * | Date: 2020/03/12
 * | 版本: 6.0
 * +---------------------------------------------------------------
 * | CopyRight: 北京永青宇创科技有限公司 All rights reserved.
 * +---------------------------------------------------------------
 * | 版权声明：云豹不是一个自由软件，是云豹官方推出的商业源码。
 * | 严禁在未经许可的情况下拷贝、复制、传播、使用云豹的任意代码
 * | 如有违反，请立即删除，否则您将面临承担相应，法律责任的风险。
 * | 如果需要取得官方授权，请联系官方 https://www.gepardshop.com
 * +---------------------------------------------------------------
 */

namespace app\mall\controller;

use app\mall\model\MallNews;

class Index extends MallHome {
	public function Index()
	{

		$data = model('mall/mallCategory')->where(['status' => 1])->select();

		$category_list = $this->category_tree($data, 0);

		$this->assignGoods();

		$this->assignFloor(1, 'one');

		$this->assignFloor(2, 'two');
		$this->assignFloor(3, 'three');
		$this->assignFloor(4, 'four');

		$this->assign('category_list', $category_list);

		$news_list = MallNews::where('status', 1)->limit(5)->select();
		$this->assign('news_list', $news_list);

		return $this->fetch('index/index');
	}

}


//preg_match('/^[a-zA-Z]+$/u',$temp_first)